/**
*      author: Y_Yao
*      created: 2024-11-16 20:19:48
**/

#include<bits/stdc++.h>

using namespace std;
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;
const int N = 5e5 + 7;
int n,k;
string s,ret;
int l[N],r[N];

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    cin >> n >> k;
    cin >> s;
    string t = " ";
    t += s;
    s = t;
    ret = s;
    int j = 1;
    for(int i = 1;i < s.size();i++)
    {
        if(s[i] == '1')
        {
            l[j] = i;
            while(s[i] == '1')
            {
                i++;
            }
            r[j] = i - 1;
            j++;
            i--;
        }
    }

    for(int i = 1;i <= n;i++)
    {
        if(i >= 1 && i <= r[k-1])
        {
            ret[i] = s[i];
        }
        else if(r[k-1] + 1 <= i && i <= r[k-1] + (r[k] - l[k]) + 1)
        {
            ret[i] = '1';
        }
        else if(r[k-1] + (r[k] - l[k]) + 2 <= i && i <= r[k])
        {
            ret[i] = '0';
        }
        else if(r[k] + 1 <= i && i <= n)
        {
            ret[i] = s[i];
        }
    }

    for(int i = 1;i < ret.size();i++)
    {
        cout << ret[i];
    }
    return 0;
}